package com.isoft.dao.tabledao;

import com.isoft.entity.tableentity.dfme_arre.Dflt;
import com.isoft.entity.tableentity.dfme_arre.DfmeArreMeta;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.sql.Timestamp;

@Mapper
public interface DfmeArreDao {
    @Insert("insert into TEAM04.COMMON_META( create_time, sndr, rcvr, seqn, ddtm, type, styp) " +
            "values( #{create_time}, #{meta.sndr}, #{meta.rcvr}, #{meta.seqn}," +
            " #{ddtm}, #{meta.type}, #{meta.styp})")
    int insertMeta(@Param("create_time") Timestamp create_time,
                   @Param("ddtm") Timestamp ddtm, @Param("meta") DfmeArreMeta dfmeArreMeta);

    @Insert("insert into TEAM04.DFME_ARRE(meta_id,create_time,flid,fatt,ffid,fide,stat,ista,msta,mist,frlt) " +
            "values(#{meta_id},#{create_time},#{dflt.flid},#{dflt.fatt},#{dflt.ffid},#{dflt.fide},#{dflt.stat},#{dflt.ista}," +
            "#{dflt.msta},#{dflt.mist},#{frlt})")
    int insertDflt(@Param("meta_id") int meta_id, @Param("create_time") Timestamp create_time,
                   @Param("dflt") Dflt dflt,@Param("frlt") Timestamp frlt);
}
